<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport"
	content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<title>资源管理</title>
<link rel="stylesheet"
	href="../static/layui/css/layui.css" media="all">
<link rel="stylesheet"
	href="../static/css/resource/resource.css" media="all">
<script src="../static/js/jquery-1.12.4.min.js"></script>
<script src="../static/layui/layui.js"></script>
<script src="../static/js/sys/resource/resource.js"></script>
<!-- 表格状态列 -->
<script id="checkboxTpl" type="text/html">
  <input type="checkbox" name="lock" value="{{d.id}}" title="锁定" lay-filter="lockDemo" checked>
</script>
</head>
<body>
	
	<!-- 树形表格 -->
	<table class="layui-hide" id="demo" lay-filter="test"></table>

	<!-- 添加模态框 -->
	<div id="addResourceModal" class="definedModal">
		<!-- 这里手动加表单样式 -->
		<form id="addResourceForm" lay-filter="addResourceForm"
			class="layui-form" action="resource" method="POST">
			<div class="layui-form-item">
				<label class="layui-form-label">资源名</label>
				<div class="layui-input-block">
					<input type="text" name="resourceName"  lay-verify="required" id="resourceName"
						placeholder="请输入资源名" autocomplete="off" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item" style="display: none">
				<label class="layui-form-label">缩写</label>
				<div class="layui-input-block">
					<input name="shortName" lay-verify="required" id="shortName"
						placeholder="请输入资源名,根据资源名生成缩写" autocomplete="off" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item" style="display: none">
				<label class="layui-form-label">父资源ID</label>
				<div class="layui-input-block">
					<input id="parentId" name="parentId" lay-verify="required"
						placeholder="请选择父资源名,根据父资源名生成父资源ID" autocomplete="off" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label".project"">父资源名</label>
				<div class="layui-input-block">
					<!-- <input type="text" name="parentName" lay-verify="required"
						placeholder="请输入父资源名" autocomplete="off" class="layui-input"> -->
						<select name="parentName" id="parentName" lay-filter="parentName">
							<option value="">请选择父资源名</option>
						</select>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">资源Url</label>
				<div class="layui-input-block">
					<input type="text" name="resourceUrl" lay-verify="required"
						placeholder="请输入资源Url" autocomplete="off" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">资源类型</label>
				<div class="layui-input-block">
					<input type="text" name="resourceType" lay-verify="required"
						placeholder="资源类型" autocomplete="off" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">资源级别</label>
				<div class="layui-input-block">
					<input type="text" name="resourceRank" lay-verify="required"
						placeholder="资源级别" autocomplete="off" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">资源序号</label>
				<div class="layui-input-block">
					<input type="text" name="resourceNumber" lay-verify="required"
						placeholder="资源序号" autocomplete="off" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item layui-form-text">
				<label class="layui-form-label">描述</label>
				<div class="layui-input-block">
					<textarea name="remark" placeholder="请输入内容"
						class="layui-textarea"></textarea>
				</div>
			</div>
			<div class="layui-form-item">
				<div class="layui-input-block">
					<button type="submit" class="layui-btn" lay-submit=""
						lay-filter="addResourceBtn">立即提交</button>
					<button type="button" class="layui-btn modalClose">关闭</button>
				</div>
			</div>
		</form>
	</div>
	
	<!-- 修改模态框 -->
	<div id="updateResourceModal" class="definedModal">
		<!-- 这里手动加表单样式 -->
		<form id="updateResourceForm" lay-filter="updateResourceForm"
			class="layui-form" action="resource" method="POST">
			<input type="hidden" name="_method" value="PUT" />
			<input type="hidden" name="resourceId" >
			<div class="layui-form-item">
				<label class="layui-form-label">资源名</label>
				<div class="layui-input-block">
					<input type="text" name="resourceName"  lay-verify="required" id="resourceName1"
						placeholder="请输入资源名" autocomplete="off" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item" style="display: none">
				<label class="layui-form-label">缩写</label>
				<div class="layui-input-block">
					<input name="shortName" lay-verify="required" id="shortName1"
						placeholder="请输入资源名,根据资源名生成缩写" autocomplete="off" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item" style="display: none">
				<label class="layui-form-label">父资源ID</label>
				<div class="layui-input-block">
					<input id="parentId1" name="parentId" lay-verify="required"
						placeholder="请选择父资源名,根据父资源名生成父资源ID" autocomplete="off" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">父资源名</label>
				<div class="layui-input-block">
					<!-- <input type="text" name="parentName" lay-verify="required"
						placeholder="请输入父资源名" autocomplete="off" class="layui-input"> -->
						<select name="parentName1" id="parentName1" lay-filter="parentName1">
							<option value="">请选择父资源名</option>
						</select>
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">资源Url</label>
				<div class="layui-input-block">
					<input type="text" name="resourceUrl" lay-verify="required"
						placeholder="请输入资源Url" autocomplete="off" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">资源类型</label>
				<div class="layui-input-block">
					<input type="text" name="resourceType" lay-verify="required"
						placeholder="资源类型" autocomplete="off" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">资源级别</label>
				<div class="layui-input-block">
					<input type="text" name="resourceRank" lay-verify="required"
						placeholder="资源级别" autocomplete="off" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">资源序号</label>
				<div class="layui-input-block">
					<input type="text" name="resourceNumber" lay-verify="required"
						placeholder="资源序号" autocomplete="off" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item layui-form-text">
				<label class="layui-form-label">描述</label>
				<div class="layui-input-block">
					<textarea name="remark" placeholder="请输入内容"
						class="layui-textarea"></textarea>
				</div>
			</div>
			<div class="layui-form-item">
				<div class="layui-input-block">
					<button type="submit" class="layui-btn" lay-submit=""
						lay-filter="addResourceBtn">立即提交</button>
					<button type="button" class="layui-btn modalClose">关闭</button>
				</div>
			</div>
		</form>
	</div>
</body>
</html>
